package com.fhz.a2102mvi.repository

import com.fhz.a2102mvi.api.FengServerApi
import com.fhz.a2102mvi.datasource.MainLocalDataSource
import com.fhz.a2102mvi.datasource.MainRemoteDataSource
import com.fhz.a2102mvi.entity.Banner
import com.fhz.a2102mvi.entity.BannerEntity
import com.fhz.a2102mvi.utils.RetrofitFactory
import javax.inject.Inject

/**
 * 时间:2023/10/14
 * @author Mr.Feng
 * 简述: TODO
 */
class MainRepository @Inject constructor(
    val mainRemoteDataSource: MainRemoteDataSource,
    val mainLocalDataSource: MainLocalDataSource
    ) {

    suspend fun getBannerList(type:Int,page:Int,pageSize:Int) : Banner {
        return mainRemoteDataSource.getBannerList()
    }
//
//    suspend fun clickBanner(type:Int) : Banner? {
//        return null
//    }

    suspend fun insertBanner(bannerEntity: BannerEntity) {
        mainLocalDataSource.insertBanner(bannerEntity)
    }
}